import wx

class MoveEvent(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id , title)

        wx.StaticText(self, -1, 'x:', (10, 0))
        wx.StaticText(self, 01, 'y:', (10,20))
        self.st1 = wx.StaticText(self, -1, '', (30, 0))
        self.st2 = wx.StaticText(self, -1, '', (30, 20))
        self.Bind(wx.EVT_MOVE, self.OnMove)
        self.Centre()

    def OnMove(self,event):
        x,y = event.GetPosition()
        self.st1.SetLabel(str(x))
        self.st2.SetLabel(str(y))
class MyApp(wx.App):
    def OnInit(self):
        me = MoveEvent(None, -1, 'moveevent.py')
        me.Show(True)
        return True

app = MyApp(0)
app.MainLoop()



